package com.example.tests;

import org.testng.annotations.Test;

import com.example.fw.Folders;

import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;

public class TestFolderRemoval extends TestBase {

	@Test
	public void testFolderRemove() {
		Folders oldFolders = app.getFolderHelper().getFolders();
		//String someFolderToDelete = oldFolders.takeSomeFolderFromList();
		//app.getFolderHelper().removeFolder(0);
		int randomIndex = app.getFolderHelper().generateRandomNumberBetween(0, oldFolders.size());
		app.getFolderHelper().removeFolder(randomIndex);
		Folders newFolders = app.getFolderHelper().getFolders();
		assertThat(newFolders, equalTo(oldFolders.withOut(randomIndex)));
	}

}